<script setup lang="ts">
import { onMounted } from 'vue'
import { storeToRefs } from 'pinia'
import { useUserStore } from '@/store/modules/user'

const userStore = useUserStore()
const { patientsAll } = storeToRefs(userStore)
const fecthAllPatientsByUser = () => {
  userStore.fecthAllPatientsByUserAction()
}
onMounted(() => {
  fecthAllPatientsByUser()
})
</script>
<template>
  <div class="patient">
    <custom-title-v1 title="就诊人管理"></custom-title-v1>
    <div class="patient-box">
      <PatientItem :patientsAll="patientsAll" :isDelete="true"></PatientItem>
    </div>
  </div>
</template>
<style scoped lang="less">
.patient {
  .patient-box {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
  }
}
</style>
